package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PointsDeptLogMapper;
import com.ruoyi.system.domain.PointsDeptLog;
import com.ruoyi.system.service.IPointsDeptLogService;

/**
 * 部门积分明细Service业务层处理
 *
 * @author ruoyi
 * @date 2024-08-21
 */
@Service
public class PointsDeptLogServiceImpl implements IPointsDeptLogService
{
    @Autowired
    private PointsDeptLogMapper pointsDeptLogMapper;

    /**
     * 查询部门积分明细
     *
     * @param id 部门积分明细主键
     * @return 部门积分明细
     */
    @Override
    public PointsDeptLog selectPointsDeptLogById(Long id)
    {
        return pointsDeptLogMapper.selectPointsDeptLogById(id);
    }

    /**
     * 查询部门积分明细列表
     *
     * @param pointsDeptLog 部门积分明细
     * @return 部门积分明细
     */
    @Override
    public List<PointsDeptLog> selectPointsDeptLogList(PointsDeptLog pointsDeptLog)
    {
        return pointsDeptLogMapper.selectPointsDeptLogList(pointsDeptLog);
    }

    /**
     * 新增部门积分明细
     *
     * @param pointsDeptLog 部门积分明细
     * @return 结果
     */
    @Override
    public int insertPointsDeptLog(PointsDeptLog pointsDeptLog)
    {
        pointsDeptLog.setCreateTime(DateUtils.getNowDate());
        return pointsDeptLogMapper.insertPointsDeptLog(pointsDeptLog);
    }

    /**
     * 修改部门积分明细
     *
     * @param pointsDeptLog 部门积分明细
     * @return 结果
     */
    @Override
    public int updatePointsDeptLog(PointsDeptLog pointsDeptLog)
    {
        return pointsDeptLogMapper.updatePointsDeptLog(pointsDeptLog);
    }

    /**
     * 批量删除部门积分明细
     *
     * @param ids 需要删除的部门积分明细主键
     * @return 结果
     */
    @Override
    public int deletePointsDeptLogByIds(Long[] ids)
    {
        return pointsDeptLogMapper.deletePointsDeptLogByIds(ids);
    }

    /**
     * 删除部门积分明细信息
     *
     * @param id 部门积分明细主键
     * @return 结果
     */
    @Override
    public int deletePointsDeptLogById(Long id)
    {
        return pointsDeptLogMapper.deletePointsDeptLogById(id);
    }
}
